 #include<stdio.h>
int Mean(int i,int j, int k,int l,int m);
void var(int mea,int n,int o,int p,int q,int r);
int main (void)
{
int a,b,c,d,e;
printf ("This is program to calculate the Mean and Variance of given any five integers\n");
printf ("Please give first integer and press enter for the second\n:");
scanf("%d",&a);
printf ("Please give second integer and press enter for the third\n:");
scanf("%d",&b);
printf ("Please give third integer and press enter for the fourth\n:");
scanf("%d",&c);
printf ("Please give fourth integer and press enter for the fifth\n:");
scanf("%d",&d);
printf ("Please give fifth integer and press enter for the calculated mean and variance\n:");
scanf("%d",&e);
int m = Mean( a, b, c, d, e);
var( m, a, b, c, d,e);
return 0;
}
int Mean(int i,int j, int k,int l,int m)
{
int me=0;
me = (i+j+k+l+m)/5;
printf ("So, the mean of given integers is %d \n:",me);
return me;
}
void var(int mea,int n,int o,int p,int q,int r)
{
int variance=0;
variance = (((mea-n)*(mea-n))+((mea-o)*(mea-o))+((mea-p)*(mea-p))+((mea-q)*(mea-q))+((mea-r)*(mea-r)))/5;
printf ("\nAnd, the variance of given integers is %d \n:",variance);
}
